# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=netmap
pkgver=0.1.3
pkgrel=5
pkgdesc='Can be used to make a graphical representation of the surrounding network.'
url='http://netmap.sourceforge.net/'
groups=('blackarch' 'blackarch-networking')
depends=('graphviz')
arch=('x86_64' 'aarch64')
license=('GPL')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('c3485a88efc8f80c3bd6d5d5b845f150bb3bdf413a2e35a8596b00e8056283a9465b6497332ab2dc51b3ddfe0e10ba353c9c14e5a6bd7987b13ef1944f334c33')

build() {
  cd "$pkgname-$pkgver"

  sed -i "s|-O|$CXXFLAGS|g" belgolib/Makefile makelist/Makefile netmap/Makefile

  make CFLAGS="$CFLAGS"
}

package(){
  cd "$pkgname-$pkgver"

  install -Dm 755 "$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 755 makelist/makelist "$pkgdir/usr/bin/makelist"
  install -Dm 644 README "$pkgdir/usr/share/doc/$pkgname/README"
}

